package app.vendorportal.api.data;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * @author Raymond
 * @version createTime：Apr 26, 2013 3:49:33 PM
 */

@XmlRootElement(name = "sso-authorize-user")
@XmlAccessorType(XmlAccessType.FIELD)
public class SSOAuthorizeUser {
    @NotNull(message = "username is required")
    @XmlElement(name = "username")
    private String userName;

    @NotNull(message = "permissions is required")
    @XmlElementWrapper(name = "permissions")
    @XmlElement(name = "permission")
    private List<String> permission;

    @XmlElementWrapper(name = "link-permissions")
    @XmlElement(name = "link-permission")
    private List<String> linkPermission;

    public List<String> getLinkPermission() {
        return linkPermission;
    }

    public void setLinkPermission(List<String> linkPermission) {
        this.linkPermission = linkPermission;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public List<String> getPermission() {
        return permission;
    }

    public void setPermission(List<String> permission) {
        this.permission = permission;
    }
}
